home *** CD-ROM | disk | FTP | other *** search
-
-
-
- NNNNSSSSDDDD((((1111MMMM)))) NNNNSSSSDDDD((((1111MMMM))))
-
-
-
- NNNNAAAAMMMMEEEE
- nsd - UNS name service daemon
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ////uuuussssrrrr////eeeettttcccc////nnnnssssdddd [ ----llllnnnnvvvv ] [ ----tttt _t_i_m_e_o_u_t ] [ ----aaaa _k_e_y=_v_a_l_u_e ]
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The Unified Name Service (UNS) provides a generic interface to network
- lookup services. The daemon provides a filesystem front end to the name
- service namespace, and maintains local cache files. The services that
- the nsd daemon supports are NIS and NIS+ - the Network Information
- Service, DNS - the Domain Name Service, local configuration files, MDBM,
- NDBM, and DB - local hash files, LDAP - Lightweight Directory Access
- Protocol.
-
- By default the nsd daemon is activated at system startup time from the
- /_e_t_c/_i_n_i_t._d/_n_e_t_w_o_r_k startup script if the configuration flag nnnnssssdddd is set
- on (see _c_h_k_c_o_n_f_i_g(1M)). The default options to the daemon can be set by
- changing the file /_e_t_c/_c_o_n_f_i_g/_n_s_d._o_p_t_i_o_n_s.
-
- The nsd daemon acts as a user level stacked filesystem. Each request is
- converted into a pathname and an internal filesystem tree is walked to
- find the result. If any path element does not exist name service library
- routines are called in order until the element is found. The libraries,
- and the order to use them, are specified in the nsd configuration file
- nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff. For the default domain this is /etc/nsswitch.conf, and
- for domains for which we are a server it would be
- /var/ns/domains/<domainname>/nsswitch.conf (for the given <domainname>).
-
- Keys which are looked up are cached into local hash files found in
- /var/ns/cache/. The name service API routine ns_lookup(3N) will check in
- the cache for keys that have already been looked up before calling the
- nsd daemon. All of the name service library routines such as
- getpwnam(3C), gethostbyname(3N), etc. are built on top of the
- ns_lookup(3) interface.
-
- The nsd daemon presents the keys through the filesystem in the files
- /ns/domain/table/key. To lookup the password entry for the root user in
- the domain engr.sgi.com you could simply cat the file:
- /ns/engr.sgi.com/passwd.byname/root. A special directory ._l_o_c_a_l is
- created for the local domain so the root password entry for the local
- domain can always be found in the file: /ns/.local/passwd.byname/root. A
- special file ._a_l_l is created in each table directory which enumerates the
- entire table. Using 'cat /ns/.local/passwd.byname/.all' would list every
- password entry using all the library routines listed in nsswitch.conf.
- Finally, a special directory ._l_i_b_r_a_r_y is created under each table
- directory for each of the libraries listed for that table in
- nsswitch.conf. Listing every password entry for the local NIS domain can
- be done by: 'cat /ns/.local/passwd.byname/.nis/.all'.
-
- When the nsd daemon is started it automatically mounts the name service
- namespace onto /_n_s using the nsmount command. The ns_lookup() library
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- NNNNSSSSDDDD((((1111MMMM)))) NNNNSSSSDDDD((((1111MMMM))))
-
-
-
- routine will always open files under this directory to satisfy the
- requests from name service lookups so this should not be changed.
-
-
- AAAAttttttttrrrriiiibbbbuuuutttteeeessss
- The nsd daemon uses named attributes attached to the files in its
- internal filesystem to control behavior. Attributes are inherited from
- parent directories if they do not exist on the individual files. These
- attributes are usually set from the nsswitch.conf configuration file, but
- global attributes can be set from the command line using the ----aaaa option.
- Attributes are key value pairs where both the key and value are strings,
- but may be interpreted internally as character strings, integers or
- booleans.
-
- Most attributes are library specific, and are listed in the section 7P
- manual page for the protocols, but a few are universal or used by the nnnnssssdddd
- daemon proper. Attributes that are to be set for all domains for for use
- by nsd must be set on the nsd command line using the -a flag. Attributes
- that are intended for one library may be set in the appropriate
- nsswitch.conf file. Attributes that are not supported by a library are
- simply ignored.
-
- ttttiiiimmmmeeeeoooouuuutttt
- The ttttiiiimmmmeeeeoooouuuutttt attribute sets the cache file record timeout in seconds.
- This should be set to a positive integer value, the default is 300
- (five minutes).
-
- nnnneeeeggggaaaattttiiiivvvveeee____ttttiiiimmmmeeeeoooouuuutttt
- The nnnneeeeggggaaaattttiiiivvvveeee____ttttiiiimmmmeeeeoooouuuutttt attribute sets the cache file record timeout in
- seconds for lookups that failed. If this attribute is unset (the
- default) the value of the ttttiiiimmmmeeeeoooouuuutttt attribute is used. This should be
- set to a positive integer value, the default is to use the value of
- the timeout attribute which defaults to 300 seconds.
-
- llllooooooookkkkuuuupppp____ttttiiiimmmmeeeeoooouuuutttt
- The llllooooooookkkkuuuupppp____ttttiiiimmmmeeeeoooouuuutttt attribute set the timeout of files under /ns in
- seconds. If this attribute is unset (the default) the internal file
- timeout (-t command line option) is used. This should be set to a
- positive integer value, and defaults to the value given by the '-t'
- command line option, or 30 seconds.
-
- lllliiiisssstttt____ttttiiiimmmmeeeeoooouuuutttt
- The lllliiiisssstttt____ttttiiiimmmmeeeeoooouuuutttt attribute set the timeout of the special
- enumeration files under /ns (.all) in seconds. If this attribute is
- unset (the default) the internal file timeout (-t command line
- option) is used. This should be set to a positive integer value,
- the default is to use the value given with the '-t' command line
- option, or 30 seconds.
-
- wwwwaaaaiiiitttt____ffffoooorrrr____sssseeeerrrrvvvveeeerrrr
- The wwwwaaaaiiiitttt____ffffoooorrrr____sssseeeerrrrvvvveeeerrrr attribute determines whether nsd should try
- forever to reach a name server or should fail the request if a
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- NNNNSSSSDDDD((((1111MMMM)))) NNNNSSSSDDDD((((1111MMMM))))
-
-
-
- server cannot be found. This is a boolean value which should be set
- to "true" or "false", and defaults to false.
-
- NOTE: Users should be aware that if using this attribute, lookups to
- maps present in /etc/nsswitch.conf on client machines will loop
- infinately if using "nis" as the protocol and the map is not present
- on the NIS server. To prevent this on such maps, make sure nis is
- not in the protocol list for that map.
-
- ddddoooommmmaaaaiiiinnnn
- The ddddoooommmmaaaaiiiinnnn attribute is empty by default and sets the default
- domain. The interpretation of this varies by protocol. It should
- be set to a character string, see the protocol man pages for
- explanations of how this string is used.
-
- pppprrrrooooggggrrrraaaammmm
- The pppprrrrooooggggrrrraaaammmm attribute is the name of the daemon used in printing
- error messages. It is automatically set to the character string
- passed in the environment, and should be considered read only.
-
- lllliiiibbbbrrrraaaarrrryyyy
- The lllliiiibbbbrrrraaaarrrryyyy attribute is set to the name of the protocol library, as
- given in nsswitch.conf, which provided the information. It should
- be considered read only.
-
- hhhhoooossssttttnnnnaaaammmmeeee
- The hhhhoooossssttttnnnnaaaammmmeeee attribute is the primary name of the local system. It
- is automatically set by calling hhhhoooossssttttnnnnaaaammmmeeee((((1111)))), and should be
- considered read only.
-
- llllooooccccaaaallll
- The llllooooccccaaaallll attribute marks part of the tree as being only accessible
- by the local host. By default the ".local" domain is marked as
- llllooooccccaaaallll, while all other trees may be remotely read. This is a
- boolean value which defaults to "false" for all but the ".local"
- subtree which defaults to "true".
-
- mmmmooooddddeeee The mmmmooooddddeeee attribute controls the permissions of the cache files
- created by nsd. This should be set to an octal integer value, the
- default is 0666 and is modified by the nsd processes umask.
-
- oooowwwwnnnneeeerrrr
- The oooowwwwnnnneeeerrrr attribute controls the owner of the cache files created by
- nsd. This should be set to an integer user ID, and the default is
- 0.
-
- ggggrrrroooouuuupppp
- The ggggrrrroooouuuupppp attribute controls the group of the cache files created by
- nsd. This should be set to an integer group ID and the default is
- 0.
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- NNNNSSSSDDDD((((1111MMMM)))) NNNNSSSSDDDD((((1111MMMM))))
-
-
-
- ccccaaaacccchhhheeeessssiiiizzzzeeee
- The ccccaaaacccchhhheeeessssiiiizzzzeeee attribute controls the fixed size of the cache files
- created by nsd. This should be set to an integer power of 2 and
- defaults to 4. The formula for computing the resulting cache size
- is: (2^n * p), where nnnn is the value of the ccccaaaacccchhhheeeessssiiiizzzzeeee parameter and
- pppp is the current pagesize. Using the default values, this formula
- becomes (2^4 * 4096) or 64KB.
-
- ppppaaaaggggeeeessssiiiizzzzeeee
- The ppppaaaaggggeeeessssiiiizzzzeeee attribute controls the mdbm pagesize of the cache files
- created by nsd. This should be set to an integer power of 2
- between 8 and 16. The default is 12 resulting in a 4KB page size.
-
- ccccaaaasssseeeeffffoooolllldddd
- The ccccaaaasssseeeeffffoooolllldddd attribute tells the protocol libraries that keys should
- be delt with in a case insensitive manner. The default is unset
- (false) except for the maps bootparams, ethers.byname, hosts.byname,
- mail.aliases, and netgroup.byhost which default to "true". For
- protocol libraries that can not process keys in a case insensitive
- manner, the key will be lowercased.
-
- ddddyyyynnnnaaaammmmiiiicccc
- The ddddyyyynnnnaaaammmmiiiicccc attribute allows nsd to create and use table names that
- have not been listed in nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff((((4444)))). The dynamic tables are
- created as subdirectories of the table marked ddddyyyynnnnaaaammmmiiiicccc. The obvious
- example would be AAAAuuuuttttooooFFFFSSSS maps. The nsswitch.conf line:
-
- automount(dynamic): nis ldap
-
- instructs nsd to allow tables to be created as subdirectories of the
- aaaauuuuttttoooommmmoooouuuunnnntttt directory. The dynamically created tables inherit all
- protocol information (nnnniiiissss first followed by llllddddaaaapppp) as well as owner
- and permissions from their parent directory, in this case
- ////nnnnssss////....llllooooccccaaaallll////aaaauuuuttttoooommmmoooouuuunnnntttt. Following the filesystem semantics of the nsd
- interface, the dynamic tables are created with the mmmmkkkkddddiiiirrrr((((2222)))) system
- call.
-
- eeeennnnuuuummmmeeeerrrraaaatttteeee____kkkkeeeeyyyy
- The eeeennnnuuuummmmeeeerrrraaaatttteeee____kkkkeeeeyyyy attribute requests that the key be added to the
- line for each item when enumerating a map. This exists for maps
- which traditionally did not include the keys but may need to be
- parsed like the traditional file that they were generated from.
- These are: automount, bootparams and netgroup.
-
- AAAADDDDMMMMIIIINNNNIIIISSSSTTTTRRRRAAAATTTTIIIIOOOONNNN
- The command nnnnssssaaaaddddmmmmiiiinnnn(1M) allows for a simple protocol-independent method
- for manipulating the name space and cache files maintained by nsd.
-
- The nsd daemon has handlers for a number of signals so that its behavior
- can be controlled while running. Sending nsd the SIGHUP signal will
- cause the daemon to reread all the nsswitch.conf files and rebuild its
- internal filesystem. The SIGUSR1 signal will cause the daemon to write a
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- NNNNSSSSDDDD((((1111MMMM)))) NNNNSSSSDDDD((((1111MMMM))))
-
-
-
- listing of its filesystem into the file /_v_a_r/_t_m_p/_n_s_d._d_u_m_p which can be
- useful for debugging. The SIGUSR2 signal will cycle the log level,
- increasing the level one value on each signal through level six, then
- setting it back to zero. Sending the SIGTERM signal will cause nsd to
- exit cleanly, attempting to unmount the /ns filesystem.
-
- An example would be if you changed the nsswitch.conf file you would type:
- "killall -HUP nsd" for the changes to take affect.
-
-
- NNNNSSSSDDDD OOOOPPPPTTTTIIIIOOOONNNNSSSS
- The following options can be specified in /_e_t_c/_c_o_n_f_i_g/_n_s_d._o_p_t_i_o_n_s or on
- the nsd command line:
-
- ----aaaa kkkkeeeeyyyy====vvvvaaaalllluuuueeee
- sets the named attribute given by key to the string given by value.
- See above, and each of the protocol man pages, for interesting
- attributes with their default and allowable values.
-
- ----llll lllleeeevvvveeeellll
- sets the log level to a value from 0 through 6. The higher the
- level the more verbose the debug logging. This defaults to 1, and
- can be changed at run time by sending the SIGUSR2 signal to the
- process. Levels above 2 are primarily for debugging.
-
- ----nnnn tells nsd not to mount the /ns filesystem.
-
- ----tttt ttttiiiimmmmeeeeoooouuuutttt
- sets the internal file timeout to the specified value in seconds.
- The default in 30 seconds.
-
- ----vvvv ``Verbose'' - run the daemon in foreground and display messages to
- stderr instead of syslog.
-
-
- FFFFIIIILLLLEEEESSSS
- /etc/config/nsd.options
- /etc/nsswitch.conf
- /var/ns/cache/*
- /var/ns/domains/*
- /var/ns/lib/libns_*.so
- /var/tmp/nsd.dump
-
-
- BBBBUUUUGGGGSSSS
- Since the nsd daemon uses the NFS protocol to present the data to the
- local system it should never be sent a SIGKILL signal, or be forced to
- exit. Doing so results in logged messages of the form "NFS3 access
- failed for server localhost (nsd): Timed out". Cleanly unmounting the
- filesystem or restarting the daemon will stop these messages.
-
- When the nsd daemon is not running, or not responding the name service
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-
-
-
- NNNNSSSSDDDD((((1111MMMM)))) NNNNSSSSDDDD((((1111MMMM))))
-
-
-
- routines fall back to local files.
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ns_lookup(3N), ns_list(3N), nsmount(1M), nsadmin(1M), nsswitch.conf(4),
- chkconfig(1M), dns(7P), nis(7P), files(7P), mdbm(7P), db(7P), ndbm(7P),
- ldap(7P)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 6666
-
-
-
-